<?php
/*
通用分类
*/
class Con_setting extends Acan{
	public $defaultAct='index';
	function __construct($ainfo=null){
		parent::__construct($ainfo=null);
		if(empty($this->id) || $this->id == '*'){
			$this->id = '0';
		}
	//	if($SEESION['uid'] != '1'){Afun_refresh("你不是管理员，不能执行此操作",'referrer');exit;}
	}
	function Act_index(){
		$form_radio_isorno = array('1'=>'启用','0'=>'不启用');
		if(!empty($_POST)) {
			$aconfig_path = A_ROOT.'/config/config_user.php';
			$aconfig_path_bak = A_ROOT.'/config/config_user.bak.php';
			$content = file_get_contents($aconfig_path);
			file_put_contents($aconfig_path_bak,$content);
			$save = $_POST['save'];
			$save2 = $_POST['save2'];
			$savetype = array('site','path','tpl','cache','email','memcache','anmp');
			foreach ($savetype as $key => $val) {
				$content = Afun_replace_define($content,$save[$val],$save2[$val],$val,'Acan_');
			}
			if(file_put_contents($aconfig_path,$content)){
				Afun_refresh('保存成功','referrer');
			}
		}

		include $this->Atpl();
	}
}

?>